<form id="app-form" class="layui-form layuimini-form">

    <div class="layui-form-item">
        <label class="layui-form-label required">打印机类型</label>
        <div class="layui-input-block">
            {foreach ['yilian'=>'易联云'] as $key=>$val}
            <input type="radio" v-model="print_type" name="print_type" lay-filter="print_type" value="{$key}" title="{$val}" {if $key==sysconfig('printer','print_type')}checked=""{/if}>
            {/foreach}
        </div>
    </div>


    <div class="layui-form-item" v-if="print_type == 'yilian'" v-cloak>
        <label class="layui-form-label required">应用id</label>
        <div class="layui-input-block">
            <input type="text" name="client_id" class="layui-input" lay-verify="required" lay-reqtext="请输入应用id" placeholder="请输入应用id" value="{:sysconfig('printer','client_id')}">
            <tip>例子：FSGGshu64642THSk</tip>
        </div>
    </div>
    <div class="layui-form-item" v-if="print_type == 'yilian'" v-cloak>
        <label class="layui-form-label required">应用密钥</label>
        <div class="layui-input-block">
            <input type="text" name="client_secret" class="layui-input" lay-verify="required" lay-reqtext="请输入应用密钥" placeholder="请输入应用密钥" value="{:sysconfig('printer','client_secret')}">
            <tip>例子：FSGGshu64642THSk</tip>
        </div>
    </div>


    <div class="hr-line"></div>
    <div class="layui-form-item text-center">
        <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="system.config/save" data-refresh="false">确认</button>
        <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
    </div>

</form>
<script>
    var upload_type = "{:sysconfig('upload','upload_type')}";
    var map_type = "{:sysconfig('map','map_type')}";
    var print_type = "{:sysconfig('printer','print_type')}";
</script>